home *** CD-ROM | disk | FTP | other *** search
/ IRIS Performer 2.2 Friends Demo / SGI IRIS Performer 2.2 Friends Demo.iso / friends / coryphaeus / dwb_writer / Makefile next >
Makefile  |  1997-10-31  |  3KB  |  165 lines

  1. # Copyright (C) Coryphaeus Software, Inc. 1994
  2. #
  3.  
  4. # Use a known shell
  5. SHELL = /bin/sh
  6.  
  7.  
  8. # Common objects used by the user
  9. COMMONOBJS = pftodwb.o pfdwb.o
  10.  
  11.  
  12. # Use the following if you have some '.o' files that haven't yet
  13. # been converted to OpenGL
  14.  
  15. # Iris GL objects
  16. IGLOBJS = ${COMMONOBJS} 
  17.  
  18.  
  19. # Open GL objects
  20. OGLOBJS = ${COMMONOBJS} 
  21.  
  22.  
  23. # IrisGL and OpenGL libraries
  24. LIBIGL = -lgl
  25. LIBOGL = -lGLU -lGL -lXext
  26.  
  27. SYSTEM_IRISGL = \
  28.     -lmld \
  29.     -lmpc \
  30.     -limage \
  31.     -lfm \
  32.     ${LIBIGL} \
  33.     -lXmu \
  34.     -lX11 \
  35.     -lm \
  36.     -lfpe \
  37.     -lmalloc \
  38.     -lC
  39.  
  40. SYSTEM_OPENGL = \
  41.     -lmld \
  42.     -lmpc \
  43.     -limage \
  44.     ${LIBOGL} \
  45.     -lXmu \
  46.     -lX11 \
  47.     -lfpe \
  48.     -lm \
  49.     -lmalloc \
  50.     -lC
  51.  
  52.  
  53. # Include Directores
  54. INCLUDE = \
  55.     -I. \
  56.     -I/usr/include \
  57.     -I/usr/include/Performer \
  58.     -I/usr/include/sys \
  59.     -I/usr/include/X11 \
  60.     -I/usr/include/Xm
  61.  
  62. # Performer libraries, irisgl and opengl
  63. IGLLIB = -lpf_igl -lpr_igl -lpfdu_igl -lpfutil_igl 
  64. OGLLIB = -lpf_ogl -lpr_ogl -lpfdu_ogl -lpfutil_ogl
  65.  
  66.  
  67. # compiler to be used
  68. CC = cc
  69.  
  70.  
  71. # special flags for the compiler
  72. # COPT and OPTIMIZEFLAG are passed in the first level of recursion
  73. # This flag is basically used when the libraries are to be shipped,
  74. # in which case this would be set to '-O2'
  75. OPTIMIZEFLAG = -O2 
  76.  
  77. CFLAGS = \
  78.     ${OPTIMIZEFLAG} \
  79.     -D__EXTENSIONS__ -D_IRIX_ -D_BTRN_ \
  80.     ${COPT} ${INCLUDE}
  81.  
  82.  
  83. # special flags for the linker
  84. LDFLAGS = \
  85.     -L/usr/lib \
  86.     -L/usr/lib/libpfdb
  87.  
  88.  
  89. usage:
  90.     @echo ">> No targets defined. Building IrisGL version"
  91.     @echo ">> The following targets are valid"
  92.     @echo ">>   - irisgl: IrisGL version"
  93.     @echo ">>   - opengl: OpenGL version"
  94.     @${MAKE} irisgl
  95.  
  96.  
  97. # default target
  98. default: usage 
  99.  
  100.  
  101. all: irisgl opengl
  102.  
  103.  
  104. # Default suffix rule. But move the object to the VPATH directory
  105. # which could be IRISGL.OPT or OPENGL.OPT
  106. .c.o:
  107.     @echo "  compiling ${VERBOSE} $*.c"
  108.     @cc -c -fullwarn ${CFLAGS} ${INCLUDE} $*.c
  109.     @mv $*.o ${VPATH}
  110.  
  111.  
  112. # Extensions
  113. IRISGL   = _igl
  114. OPENGL   = _ogl
  115.  
  116.  
  117. # Target for IRISGL non-encrypted version of pftodwb
  118. irisgl:
  119.     @echo "\nMaking IrisGL version of pftodwb\n"
  120.     @if test ! -d IRISGL.OPT ; then \
  121.        mkdir -p IRISGL.OPT ; \
  122.      fi
  123.     @${MAKE} -f Makefile \
  124.         VPATH="IRISGL.OPT/" \
  125.         COPT="-DIRISGL" \
  126.         LIBRARIES='${IGLLIB} ${SYSTEM_IRISGL}' \
  127.         OBJECTS='${IGLOBJS}' \
  128.         VERBOSE="[IrisGL version]" \
  129.         EXTENSION="${IRISGL}" \
  130.         pftodwb${IRISGL}
  131.  
  132.  
  133. # Target for OPENGL non-encrypted version of pftodwb
  134. opengl:
  135.     @echo "\nMaking OpenGL version of pftodwb\n"
  136.     @if test ! -d OPENGL.OPT; then \
  137.        mkdir -p OPENGL.OPT; \
  138.      fi
  139.     @${MAKE} -f Makefile \
  140.         VPATH="OPENGL.OPT/" \
  141.         COPT="-DOPENGL" \
  142.         LIBRARIES='${OGLLIB} ${SYSTEM_OPENGL}' \
  143.         OBJECTS='${OGLOBJS}' \
  144.         VERBOSE="[OpenGL version]" \
  145.         EXTENSION="${OPENGL}" \
  146.         pftodwb${OPENGL}
  147.  
  148.  
  149. # Default targets. Creates one of the following executables:
  150. #   pftodwb_igl
  151. #   pftodwb_ogl
  152.  
  153.  
  154. pftodwb${EXTENSION}: ${OBJECTS} 
  155.     @echo "Linking ${VERBOSE} pftodwb"
  156.     @cd ${VPATH}; \
  157.     cc ${OBJECTS} \
  158.        ${LDFLAGS} ${ESCENELIB} ${LIBRARIES} \
  159.        -o ../pftodwb${EXTENSION}
  160.  
  161.  
  162. # Put your .o -> .c dependencies here
  163. # DO NOT DELETE
  164.